#include <func.h>

void function(int signum,siginfo_t *p,void *p1)
{
    printf("sig pid=%d,sig uid=%d\n",p->si_pid,p->si_uid);
    sleep(2);
    return 0;
}

int main()
{
    struct sigaction act;
    bzero(&act,sizeof(act));
    act.sa_sigaction=function;
    act.sa_flags=SA_SIGINFO;
    int ret=sigaction(SIGINT,&act,NULL);
    ERROR_CHECK(ret,-1,"sigaction");
    while(1);
    return 0;
}